﻿@model User.Web.Models.Account.ChangePasswordModel

@{
    ViewBag.Title = PageTitles.ChangePassword;
}

<div class="row">
    <div class="col-md-12">
        @Html.ShowCustomMessage()
    </div>
</div>

@using (Html.BeginForm("ChangePassword", "Account", FormMethod.Post, new { @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()
    <div class="row">
        <div class="col-md-12">
            <div class="panel panel-default">

                <div class="panel-heading">
                    <h4>@ViewBag.Title</h4>
                </div>

                <div class="panel-body">
                    
                    <div class="form-group">
                        @Html.LabelFor(model => model.OldPassword, new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.EditorFor(model => model.OldPassword)
                            @Html.ValidationMessageFor(model => model.OldPassword)
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.Password, new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.EditorFor(model => model.Password)
                            @Html.ValidationMessageFor(model => model.Password)
                        </div>
                    </div>

                    <div class="form-group">
                        @Html.LabelFor(model => model.ConfirmPassword, new { @class = "control-label col-md-2" })
                        <div class="col-md-10">
                            @Html.EditorFor(model => model.ConfirmPassword)
                            @Html.ValidationMessageFor(model => model.ConfirmPassword)
                        </div>
                    </div>

                </div>
                <div class="panel-footer">
                    <div class="form-group">
                        <div class="col-md-offset-2 col-md-10">
                                <input type="submit" class="btn btn-primary" value="@ControlNames.Save" />
                            </div>
                        </div>
                </div>
            </div>
        </div>
    </div>
}

<hr />

<div class="row">
    <div class="col-md-12">
        @Html.ActionLink(ControlNames.Home, "Index", "Home", null, new { @class = "btn btn-default" })
    </div>
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
